package com.dog.modules.iot.util;

import java.security.MessageDigest;

public class SHA256 {

    public static byte[] getSha256(byte[] data) {
        try {
            MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
            messageDigest.update(data);
            return messageDigest.digest();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }


   /* public static void main(String[] args) {
        final HmacSHA1Signature sha1Signature = new HmacSHA1Signature();
        System.out.println(sha1Signature.computeSignature("RCPD" + "00002540Tpi2_android", "00002540Tpi2_android" + ":" + 123456));
    }*/

}
